#docker环境搭建脚本

#下载docker
curl -fsSL get.docker.com -o get-docker.sh
# sh get-docker.sh --mirror Aliyun
sh get-docker.sh --mirror AzureChinaCloud

#配置镜像加速
echo "{\"registry-mirrors\": [\"https://qy5lms4s.mirror.aliyuncs.com\"]}" >/etc/docker/daemon.json
#重启服务
systemctl daemon-reload
systemctl restart docker
#拉取ubuntu:16.04测试
# docker pull ubuntu:16.04

#docker-compose的安装
curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m) >/usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose